package com.company;

import java.io.IOException;

public class Task4 {
    public static void main(String[] args) {
        //todo throw和throws的区别是什么？请写一段程序加以说明。

        try {
            doA();
        } catch (IOException ie) {
            ie.printStackTrace();
        }
    }

    public static void doA() throws IOException {
        throw new IOException("自定义异常");
    }
}
